<script type="text/javascript">

$(function() {
//    $("table tr:nth-child(odd)").addClass("striped");//.hover(function(){this.removeClass("striped")});
});



</script>

<style>
    tr.striped {
        background-color: #EEEEEE;
}
</style>

<div class="box white_bg">

<h2> list of categories in type: <?=$this->viewParams['type'] ?></h2>
<table border = '1' width='100%'>
	<tr>
		<td>
			ID
		</td>
		<td>
			Name
		</td>
		<td>
			Parent ID
		</td>
		<td>
			Title
		</td>
		<td>
			Tree Path
		</td>
		<td>
			Weight
		</td>
		<td>
			Multiselect
		</td>
		<td>
			Operation
		</td>
	</tr>
	<?if(isset($this->viewParams['categoryList'])) :?>
	<? foreach ($this->viewParams['categoryList'] as $row) :?>
	<tr>
		<td>
			#<?=$row['id']?>
		</td>
		<td>
			<a href="/en/category/master/view?id=<?=$row['id']?>&type=<?=$this->viewParams['type'] ?>" > <?=$row['name'] ?></a>
		</td>
		<td>
			<?=$row['pid'] ?>
		</td>
		<td>
			<?=$row['title']?>
		</td>
		<td>
			<?=$row['tree_path']?>
		</td>
		<td>
			<?=$row['weight']?>
		</td>
		<td>
			<?=$row['allow_multiselect']?>
		</td>
		<td ><a href="/en/category/master/edit?id=<?=$row['id']?>&type=<?=$this->viewParams['type'] ?>">edit</a> |
            <a href="/en/category/master/delete?id=<?=$row['id']?>&type=<?=$this->viewParams['type'] ?>">delete</a>
        </td> 
	</tr>
	<?endforeach ?>
	<?endif?>
</table>
</div>
